#pragma once
#include "ActorComponent.h"
#include "Geometry.h"

class TransformComponent2D : public ActorComponent
{
protected:
	Vec2 m_position;
	double m_orientation;
	Vec2 m_size;

public:
	static const char* g_name;
	static const ComponentId& g_ID;

	TransformComponent2D(void)  { }
    virtual bool VInit(tinyxml2::XMLElement* pData) override;
	virtual const char *VGetName() const override { return g_name; }

	Vec2 GetPosition() const { return m_position; }
	void SetPosition(const Vec2& pos) { m_position = pos; }
	Vec2 GetSize() const { return m_size; }
	void SetSize(const Vec2& size) { m_size = size; }
	double GetOrientation() const { return m_orientation; }
	void SetOrientation(const double& orientation) { m_orientation = orientation;  }
};

extern ActorComponent* CreateTransformComponent2D();